package com.lian.chatroom.message;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString(callSuper = true)
public class ChatResponseMessage extends AbstractResponseMessage{

    private String from;    //谁发送的消息
    private String content; //消息内容

    //生成子类自己的构造方法
    public ChatResponseMessage(String from, String content) {
        this.from = from;
        this.content = content;
    }

    //生成父类的构造方法
    public ChatResponseMessage(boolean success, String reason) {
        super(success, reason);
    }

    @Override
    public int getMessageType() {
        return ChatResponseMessage;
    }
}
